﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="NullLoggingService.cs" company="XamlNinja">
//   2011 Richard Griffin and Ollie Riches
// </copyright>
// <summary>
//   Null logging service - several service require an implementation of the ILog interface, they are initialised
//   with this version.
// </summary>
// --------------------------------------------------------------------------------------------------------------------


namespace Logging
{
    using System;
    using System.Collections.Generic;
    using System.Linq;

    /// <summary>
    /// Null logging service - several services require an implementation of the ILog interface, they are initialised
    /// with this version.
    /// </summary>
    public sealed class NullLoggingService : ILogManager
    {
        /// <summary>
        /// Event fired when log file has been modified - this implementation does nothing.
        /// </summary>
        public event EventHandler LogModified;

        public ILog Write(string message)
        {
            return this;
        }

        public ILog Write(string message, params object[] args)
        {
            return this;
        }

        public ILog Write(string message, Exception exception)
        {
            return this;
        }

        public ILog WriteDiagnostics()
        {
            return this;
        }

        public string LogPath
        {
            get { return string.Empty; }
        }

        public IEnumerable<string> Messages
        {
            get { return Enumerable.Empty<string>(); }
        }

        public ILogManager Enable()
        {
            return this;
        }

        public ILogManager Disable()
        {
            return this;
        }

        public ILogManager Clear()
        {
            return this;
        }
    }
}